package com.wangxianseng.file;

import org.apache.logging.log4j.util.Strings;

import java.util.Arrays;
import java.util.List;

public class StringUtil {
    // \ --> /
    public static String  replaXg(String path) {
        if (!Strings.isEmpty(path)) {
            return path.replace("\\", "/");
        }
        return path;
    }
    //字段名处理  截取 = :
    public static String replaceFiledName(String startStr) {
        List<String> strings = Arrays.asList("=", ":");
        for (String string : strings) {
            if (startStr.contains(string)) {
                return startStr.replace(string,"");
            }
        }
        return startStr;
    }
}
